local famBags = LibStub('AceAddon-3.0'):GetAddon('famBags')
famBags.LDBCurrency = {}
-- :::::::::::: LOCALS ::::::::::::: -------------------------------------------------------------------------

-- :::::::::::: famBags.LDBBags ::::::::::::: -------------------------------------------------------------------------
function famBags.LDBCurrency:Create()
   if not self.LDB then
      self.LDB = LibStub("LibDataBroker-1.1"):NewDataObject("famBags Currency", {
         type  = 'data source', 
         icon	= 'Interface\\Icons\\INV_Misc_Coin_01',
         label	= famBags.L['famBags Currency']--[[,
	    	OnClick = function(frame, button)
	    	   if button == 'LeftButton' then
	        	   OpenAllBags()
	        	elseif button == 'RightButton' then
	        	   famBags:LoadOptions()
	        	end
	    	end]],
      })
   end
end

function famBags.LDBCurrency:Update(money)
   self.LDB.text = money or famBags:GetMoney()
end

